package main

import "fmt"

type read interface {
	read()
}

type write interface {
	write()
}

// 如下接口嵌套了前面的接口，继承了前面接口的方法
type readwrite interface {
	read
	write
	readwrite()
}

// 实现类
type st1 struct {
}

// 接口实现
func (s st1) read() {
	//TODO implement me
	fmt.Println("read")
}

func (s st1) write() {
	//TODO implement me
	fmt.Println("write")
}

func (s st1) readwrite() {
	//TODO implement me
	fmt.Println("readwrite")
}

func main() {
	var pro readwrite = &st1{}
	pro.read()
	pro.write()
	pro.readwrite()

}
